
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--声明 jstl 标签--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>user JSP</h1>
<%--el 表达式--%>
${username}
${password}
${sex}

${sessionScope.username}

<%--jstl c:if  c:foreach--%>
<%--test 表达式为true 就显示， 否则不显示--%>
<c:if test="${1<10}">
    1<10
</c:if>
<c:if test="${1>10}">
    1>10
</c:if>

<table border="1" cellspacing="0">
    <tr>
        <th>序号</th>
        <th>账号</th>
        <th>密码</th>
    </tr>

    <%--items: 遍历的集合  var:遍历出来的每个元素或者对象  varstatus 循环的状态--%>
    <c:forEach items="${users}" var="u" varStatus="idx">
        <tr>
            <td>${idx.count}</td>
            <td>${u.username}</td>
            <td>${u.password}</td>
        </tr>
    </c:forEach>

</table>


</body>
</html>
